

import api from '@/util/request'
import { PREFIX } from '@/constant/const'
const urlcode = PREFIX.urlCode // 来源数据中台


// 获取填报表单列表
export function writeFormPageList(data) {
  return api.post(urlcode + '/writeForm/page', data)
}

// 新增填报表单
export function copyWriteForm(data) {
  return api.post(urlcode + `/writeForm/copy`,data)
}
// 复制填报表单
export function addWriteForm(data) {
  return api.post(urlcode + '/writeForm/add', data)
}
// 更新填报表单
export function updateWriteForm(data) {
  return api.put(urlcode + `/writeForm/${data.formCode}/update/write-form`, data)
}

// 删除填报表单
export function delWriteForm(id) {
  return api.delete(urlcode + '/writeForm/delete', {params: {id}})
}

// 关联填报表单
export function relateWriteForm(data) {
  return api.put(urlcode + `/writeForm/relateForm`, data)
}

// 通过客户端类型列出未关联的表单
export function unrelatedFormList(params) {
  return api.get(urlcode + '/writeForm/unrelatedForm', {params})
}
// 权限设置查询
export function writeFormQuery(data) {
  return api.post(urlcode + '/write-form-authorizations/list', data)
}
// 权限设置更新
export function writeFormPerssionSettingUpdate(data,type) {
  return api.post(urlcode + `/write-form-authorizations/save-or-update/${type}`, data)
}